package web;

import javax.servlet.Filter;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.CharacterEncodingFilter;

/**
 * Hello world!
 *
 */
@Configuration
@ComponentScan
@EnableAutoConfiguration
public class BeautyApplication {
    public static void main(String[] args) {
        SpringApplication.run(BeautyApplication.class, args);
    }
    
    @Bean
    public Filter characterEncodingFilter() {
    	  CharacterEncodingFilter characterEncodingFilter =new CharacterEncodingFilter();
    	  characterEncodingFilter.setEncoding("UTF-8");
    	  characterEncodingFilter.setForceEncoding(true);
    	  return characterEncodingFilter;
    }
}